package com.example.module_main

import android.util.Log
import com.alibaba.android.arouter.facade.annotation.Route
import com.alibaba.android.arouter.launcher.ARouter
import com.blankj.utilcode.util.ToastUtils
import com.example.common_base.ac.BaseAcKtBind
import com.example.common_base.net.*
import com.example.module_main.databinding.ActivityTestBinding

@Route(path = "/path/test")
class TestActivity : BaseAcKtBind<ActivityTestBinding>() {
    override fun initSuc() {
        NetHelper.getInstance().getMyApi(AaApi::class.java)
            .ad_index("34.20968", "1", "229", "117.286255")
            .compose(HttpObserver.schedulers())
            .`as`(RxLifecycleUtils.bindLifecycle(this))
            .subscribe(HttpObserver(HttpSuccessListener {
                Log.e("tag", ": ");
                ToastUtils.showShort("请求成功")

            }, HttpErrorListener {

                Log.e("tag", ": ");
            }))



        binding.button2.setOnClickListener {
            ARouter.getInstance().build("/java/devjava").navigation()

        }
    }
}